﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NHModel.Entities
{
    public class Product
    {
        #region Member Variables

        protected int _id;
        protected string _name;
        protected int _isActive;


        #endregion

        #region Constructors

        public Product() { }

        public Product(string name, int isActive)
        {
            this._name = name;
            this._isActive = isActive;
        }

        #endregion

        #region Public Properties

        public virtual int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public virtual string Name
        {
            get { return _name; }
            set
            {
                if (value != null && value.Length > 50)
                    throw new ArgumentOutOfRangeException("Invalid value for Name", value, value.ToString());
                _name = value;
            }
        }

        public virtual int IsActive
        {
            get { return _isActive; }
            set { _isActive = value; }
        }


        #endregion

    }
}
